package com.oa.common.identity;

import java.util.UUID;

/**
 * @author cuichao
 * Id工具类
 */
public class IdGenerateUtils {

    private static final UUIDRandomIdGen UUID_RANDOM_ID_GEN = new UUIDRandomIdGen();
    private static final LocalSownFlakeIdGen SOWN_FLAKE_ID_GEN = new LocalSownFlakeIdGen();
    private static final String DEFAULT_KEY = "none";

    public static String uuid(){
       return UUID_RANDOM_ID_GEN.getId(DEFAULT_KEY);
    }

    public static String snowflake(){
       return SOWN_FLAKE_ID_GEN.getId(DEFAULT_KEY).toString();
    }

}
